package com.longqin.business.service;

import com.longqin.business.entity.BusProject;
import com.longqin.business.entity.BusProjectPlan;
import com.longqin.business.entity.BusProjectProblem;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 项目管理 服务类
 * </p>
 *
 * @author longqin
 * @since 2025-01-21
 */
public interface IBusProjectService extends IService<BusProject> {

	BusProject getById(int id);
	
	List<BusProject> getPage(String projectName, int organizationId, int userId, int startIndex, int pageSize);
	
	int getCount(String projectName, int organizationId, int userId);
	
    int delete(int id) throws Exception;
    
    int updateStatus(int status, int id) throws Exception;
    
    int updateBeginDate(int id) throws Exception;
    
    int create(BusProject entity) throws Exception;
    
    int update(BusProject entity) throws Exception;
    
    BusProject getByWorkId(int workId);
    
    List<Map<String, Object>> getPlanTree(Integer projectId);
    
    void saveProjectPlan(Integer projectId, List<BusProjectPlan> plans) throws Exception;
    
    int dealProjectPlan(BusProjectPlan entity) throws Exception;
    
    List<BusProjectProblem> getProblemPage(Integer projectId, String title, String beginTime, String endTime, int startIndex, int pageSize);
    
    int getProblemCount(Integer projectId, String title, String beginTime, String endTime);
    
    int createProblem(BusProjectProblem entity) throws Exception;
    
    int updateProblem(BusProjectProblem entity) throws Exception;
    
    BusProjectProblem getProblemById(int id);
    
    BusProjectProblem getProblemByWorkId(int workId);
    
    int updateProblemStatus(int status, int id) throws Exception;
}
